/* 
 *  Incub - incubate your baby robot
 *  Copyright (C) 2008 Stanislaw Szymczyk
 *  e-mail: sszymczy@gmail.com   www: http://cogville.cog-lab.com
 *
 *  This file is part of Incub.
 *
 *  Incub is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  Incub is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Incub.  If not, see <http://www.gnu.org/licenses/>.
 * 
 */
 
#ifndef GATE_H_
#define GATE_H_

#include "incub.hh"
#include "ClientCallback.h"
#include "Corba.h"

class Gate : public POA_IGate {
	private:
	friend class Corba;
	VWorldOut *vWorldOut;
	VWorldIn *vWorldIn;
	World *world;
	public:
	Gate(World*, VWorldOut *, VWorldIn *);
	void registerCallback(IClientCallback_ptr call);
	void unregisterCallback(IClientCallback_ptr call);
	VWorldOut* getVWorldOut();
	void setVWorldOut(VWorldOut*);
	VWorldIn* getVWorldIn();
	void setVWorldIn(VWorldIn*);
	World* getWorld();
	void setWorld(World*);
	VSensorOut* getVSensorOut(const char* path);
	void setVMotorIn(const char* path, VMotorIn*);
	VMotorOut* getVMotorOut(const char* path);
	void copyJoint(VJointIn*, Joint* joint);
	void copyEntity(VEntityIn*, Entity* entity);
	void copyWorld(VWorldIn*, World* world);
};

#endif /*GATE_H_*/
